home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / Arkanoid Flash.swf / scripts / frame_22 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  1.1 KB  |  47 lines

  1. i = "1";
  2. while(noOfSL >= i)
  3. {
  4.    slow_y = getProperty("slow" add i, _Y);
  5.    slow_y += "6";
  6.    setProperty("slow" add i, _Y, slow_y);
  7.    if("390" < slow_y)
  8.    {
  9.       bat_x = getProperty("/bat", _X);
  10.       bat_left = bat_x - batWidth / "2";
  11.       bat_right = bat_x + batWidth / "2";
  12.       slow_x = getProperty("slow" add i, _X);
  13.       slow_left = slow_x - "10";
  14.       slow_right = slow_x + "10";
  15.       if(slow_left >= bat_left and bat_right >= slow_right)
  16.       {
  17.          tellTarget("/soundFX")
  18.          {
  19.             gotoAndStop("Slow");
  20.             play();
  21.          }
  22.          trace("You\'ve just got SLOW");
  23.          if(magnitude >= "5")
  24.          {
  25.             magnitude -= "2";
  26.             speed_ind -= "2";
  27.          }
  28.          else
  29.          {
  30.             magnitude = "3";
  31.             speed_ind = "1";
  32.          }
  33.          timer = getTimer();
  34.          power_up = "slow";
  35.          call("reset_capsules");
  36.          removeMovieClip("slow" add i);
  37.          onscreen_SL = "0";
  38.       }
  39.       else
  40.       {
  41.          removeMovieClip("slow" add i);
  42.          onscreen_SL = "0";
  43.       }
  44.    }
  45.    i += "1";
  46. }
  47.